package com.gzx.plugin.tjzy.feign.project.controller;

import com.gzx.plugin.tjzy.feign.project.service.GzxProjectFeignService;
import com.gzx.tjzy.feign.resp.project.GzxProjectRespDto;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zjt
 * @description
 * @date 2025/4/9 18:24
 */
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/feign/tjzy/project")
public class GzxProjectFeignController {

    private final GzxProjectFeignService projectFeignService;

    /**
     * 根据产品编码获取项目
     */
    @RequestMapping("/getProjectByCompany")
    public List<GzxProjectRespDto> getProjectByCompany(@RequestParam("companyCode") String companyCode) {
        return projectFeignService.getProjectByCompany(companyCode);
    }

    /**
     * 获取当月所有有案件的项目
     */
    @RequestMapping("/listCaseProject")
    public List<GzxProjectRespDto> listCaseProject() {
        return projectFeignService.listCaseProject();
    }

    /**
     * 获取所有项目的在催案件量和在催人力
     */
    @RequestMapping("/listCaseDebt")
    public List<GzxProjectRespDto> listCaseDebt() {
        return projectFeignService.listCaseDebt();
    }
}
